package com.zlp.spring.tx.service.v1.mapper;


import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

@Mapper
public interface UserMapper {


   @Select("select * from sys_user limit 1")
   List<Map<String,Object>> getUsers();

   @Insert("INSERT INTO `sys_user`(`username`, `password`) VALUES (#{username}, #{password} );")
   void addUser(@Param(value = "username") String username,@Param(value = "password") String password);
}
